Creating Objects

Auto Build

Forms

Classes

Windows

Modules

Help Contents

 

Auto Build

The ObjGen Application Object contains a very powerful feature called 'Auto Build'. It is accessible from within the Application object edit window under the 'Auto Build' tab. Here, you may automatically create multiple Class and Form objects for your Application based on the tables and views defined in the Project's current database object. For every table or view name selected in the table listbox, a corresponding Application object is created based on the Auto Build options you select.

You may choose to create a Class object for each table selected and a Data Form that uses the new Class. Data Forms can also be created using In-Line SQL syntax if you prefer. You may also select an option to automatically create Master/Detail Data Forms for all tables that have a foreign key lookup to the selected table.

 

Forms

The ObjGen Data Form object allows you to define a form in the target Application that provides full Browse, Insert, Update and Delete capabilities over 1 or more database tables. To create a Data Form you can click on the 'Add Form' toolbar button or you may right click in the Project viewer and select the 'Add Form' menu item.
 
To define a Form's database table connection, select the Form object in the Project viewer. The Form definition screen will allow you to choose which database table will be connected to the form. You must have a Database object associated with the Application in order to create the form's link to its primary table. By default the Form's name is derived from the primary table name. You may change the name using the Form name edit box.
Once the primary table is defined, you select which of the table's columns will become display fields in the generated Application. See Defining Display Fields
 
Once a Form's primary table link is established you may create a Master/Detail Data Form. The Form definition view uses a 'Detail Table' tab for you to select which database table will be used for the detail view. Only those tables in the database that are related to the Form's current primary table link via a Foreign key lookup will be displayed in the detail table name list. The generated Master/Detail Form will contain an editable grid with a field for each detail table column selected as a display field.

By default, buttons are created on the Form to navigate the data in the table and to perform reads and writes of table data. Form objects connected to database views do not support row insertion, deletion or updates.

When using the default code generator and not code templates, two different data access strategies are possible when creating Data Forms. By default the initial Form definition's data access strategy is to use In-Line embedded SQL. In other words all query syntax is generated directly into the Form object's definition. While this approach may be used in certain situations, we recommend using Application Data Class objects for handling all table access operations.

When the Form's data access strategy is set to 'Use Application Data Classes' the list of available record sources will contain all defined Application Class Objects that have a link to the current Database object. When a particular Class Object is selected as the record source, its list of available properties which are views of the class object's underlying table are available for defining display fields in the Form object. Subsequently, the 'Detail Record' tab will contain only those class objects that are defined in the Application that link to the current primary class object's underlying table. For more information on Class Objects, please see Classes.

If your project has been defined to use code templates, ObjGen will automatically load the corresponding code template as defined in the current framework for your application. You may load a custom code template from the Form's code window.

Defining Display Fields
 
Once your Data Form is connected to a database table you can select the columns you want to add to your Form as display fields by double clicking on the column name or by using the ADD button in the Form definition view window. Clicking the 'ALL' button to creates display fields for all available columns. To remove a display field from a Form's definition, you may either delete them one at a time by double clicking the display field name or by clicking the 'DEL' button. Clicking the 'NONE' button removes all display fields.

 

Classes

ObjGen supports the creation of powerful Data Classes that let you build a library of reusable objects that provide full access to your database tables. To create a class object you can right click in the Project viewer or click the 'Add Class' toolbar button. To edit the class definition select the Class object in the Project viewer. The Class edit definition view allows you to specify which table your class will implement full data access for. You may also define which columns in the table will become public properties of the Class that provide input and output to users of the class in the target Application.

If your project has been defined to use code templates, ObjGen will automatically load the corresponding code template as defined in the current framework for your application. You may load a custom code template from the Class code window.

Windows

Each Application created by ObjGen will contain a set of default system windows that are required by the target Application. Since these objects are protected, they may not be deleted or renamed. However, you may change each system window's caption.

You can also create empty window templates that will be available for you to customize once the target Application is generated.

 

Modules

Each Application created by ObjGen will contain a set of default system modules which incorporate a standard set of support functions that are used by the Forms and Classes that you define and generate in the target Application. Since these objects are protected, they may not be deleted or renamed.

You can also create stub modules that will be available for you to customize once the target Application is generated.

 

 

Top of page


Copyright Information
 
Copyright ⌐ 1998-1999 Everett Ward Systems. All rights reserved.
Other products & companies referred to herein are trademarks or registered trademarks of their
respective companies or mark holders.